home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Archive-tools / lpunchdecoder1.12 Folder / LPunch decoder notes < prev   
Text File  |  1992-06-04  |  7KB  |  149 lines

  1. LPunch Decoder Version 1.1.2
  2. June 4, 1992 at 11:04 am.
  3.  
  4. ©1989, 1990, 1991, 1992 By John Hill.
  5.  
  6. I have downloaded a good number of files from LISTSERV at IRLEARN from time
  7. to time, and many of these are in LPunch format. I got the sample decoder
  8. programs in Pascal and C, and implemented the Pascal one as a Think Pascal
  9. 2.0 "plain vanilla" application. The result seemed to me to be unnatural in a
  10. Macintosh environment (typing in those file names!) and even adapting it to
  11. use the standard SFOpen and SFClose dialogs didn't help much. Also it seemed
  12. to me to be slow.
  13.  
  14. I therefore decided to write a decoder that was
  15. 1) More Mac-like than the "plain vanilla" implemetation;
  16. 2) Gave some comfort to the user while it was running (the "plain vanilla"
  17. version just went quiet for a worryingly long time);
  18. 3) Better at reporting what had gone oops! when decoding a file;
  19. 4) Offered its users the default option of *not* having spaces padding the
  20. ends of lines (particularly in Fixed record format) and
  21. 5) Maybe, was faster.
  22.  
  23. Here, for good or ill, is the result. I claim copyright, but it is freeware
  24. nonetheless; all I ask is that you pass it on to anyone you wish *in its
  25. original form* - the best way to do this is to keep the StuffIt file in which
  26. it and these notes came, and pass *that* on. This will have the dual advantage
  27. that I will be happy and you can be sure you are not passing on any viruses.
  28.  
  29. I have tested the utility as thoroughly as I can in the absence of a formal
  30. specification of the L-Punch encoding algorithm; but if you manage to break
  31. it, or have any other problem, please e-mail me with the details. If you like
  32. it, send me a postcard. And if you'd like a good laugh at my programming
  33. skills, send me a couple of floppy disks and I'll return the source code on
  34. one of them (but you'll never see the other one again).
  35.  
  36. e-mail: Janet: J_S_Hill%MOD.UK.ARE-PN@UK.AC.Ucl.Cs.ESS
  37. snail: Dr. J. S. Hill
  38.        45 Watcombe Road,
  39.        Bournemouth BH6 3LU,
  40.        U.K.
  41.  
  42. Notes.
  43. There's not much you can do wrong with this utility, except to try and run it
  44. on a Mac that doesn't support the Hierarchical Filing System. (If I've got it
  45. right from Inside Macintosh, it should stop you even trying). In general, menu
  46. options are greyed out when you can't usefully select them.
  47.  
  48.  
  49. File Menu:
  50. Open - will open any TEXT file as input.
  51.  
  52. Close - closes the input file.
  53.  
  54. Save - the scratch file (which is named LPD-<a large integer> replaces the
  55. input file. This option is only available if the decoding has proceded
  56. faultlessly. Otherwise you will have to
  57.  
  58. Save As… - This calls up the standard dialog box. You will be offered the
  59. LISTSERV file name as a default, if the control line has been found and
  60. decoded. Move the Cat is invoked if the destination is on the same volume as
  61. the input file; if it's on another volume, the file is copied. (If you attempt
  62. to Save As… the input file without closing the latter, it'll warn you off).
  63.  
  64. Quit - does just that. However, if you've got a scratch file hanging about, it
  65. will ask you if you really want to quit without saving it.
  66.  
  67. Edit menu:
  68. There's nothing in this application that can be cut, copied, pasted or
  69. cleared, so it's greyed out.
  70.  
  71.  
  72. Decode menu:
  73. LPunched only - decodes the encoded part of the input file and puts the
  74. result in a scratch file ready to be Saved or Saved As… (or junked on Quit).
  75.  
  76. Retain all text - Does the same operation, but copies any text not in LPunch
  77. format both before and after the encoded part. Useful (a) if you want to
  78. retain the e-mail headers and (b) to see what's happened if you hit a problem.
  79.  
  80. Listing–>d/base - This is a special, and applies to MACFILE LISTING files
  81. only. The LPunched file is decoded into a format suitable for direct input
  82. into Excel or some similar spreadsheet or database, with the various columns
  83. separated by tabs. Note:
  84. a) That the / characters in the file descriptor are also converted to tabs.
  85. b) There is an option in the sub-menu (which must be selected) to have the
  86. date in either month-day-year or day-month-year format. Spreadsheets are fussy
  87. about things like that.
  88. c) Files not in the correct format are rejected.
  89.  
  90. Spaces at line ends - If you select this menu item, it is checked and
  91. thereafter the trailing spaces at the ends of lines (particularly in Fixed
  92. record format) will appear in your output file. Otherwise, trailing spaces
  93. (which are alien to the Macintosh ethos) are suppressed. Does NOT apply if
  94. Listing–>d/base is selected.
  95.  
  96.  
  97. Other points:
  98.  
  99. Output files have a characteristic icon, but they are TEXT files nonetheless
  100. and can be read by any application that will read text files, e.g. BinHex 4.0
  101. or the StuffIt implementation thereof, Excel (if you want to read into a
  102. spreadsheed), McSink/Vantage, any bog-standard wordprocessor…
  103. If the unfamiliar icon bothers you, get ResEdit and change STR 128 to the
  104. creator appropriate to the icon you want to label the file with. If you don't
  105. know what this means, don't attempt it! And don't pass a copy modified in this
  106. way on to anyone else.
  107.  
  108. Speed… I got the MACFILE LISTING file, which as recieved (i.e. including the
  109. e-mail headers) consisted of 4301 lines of text (275133 characters) in Fixed
  110. Length Record format. It took my "plain vanilla" implementation of the example
  111. program 7 minutes and 7 seconds to decode it (using a Macintosh IIx). The
  112. application you now have took 36 seconds to decode it with no spaces at the
  113. end of lines, and 39 seconds with each line filled out to 132 columns. Maybe
  114. it won't always be that much faster?
  115.  
  116. Tolerance… The utility is NOT tolerant of incorrect formatting of the control
  117. line or the record headers, except that it will accept anything that LISTSERV
  118. is likely to throw at it in the way of a file name. This is quite deliberate;
  119. it could get awfully confused if it accepted a header that was in fact
  120. corrupt. The Listing–>d/base option will work only if the key spaces between
  121. columns throughout the source file are in EXACTLY the correct places.
  122.  
  123. Memory… The program will run in ≈37K under Multifinder, but a larger partition
  124. is recommended to minimise file transfers - I recommend around twice the size
  125. of the largest input file you're likely to encounter plus 40K. It comes to you
  126. with a partition of 384K.
  127.  
  128. Acknowledgements. Quite a few people have helped me with advice or anecdotal
  129. information about LPunch formatting while I was writing this program. Names
  130. that come to mind are Mark Williamson, Chris Cranbourn, Robin Haigh, Brian
  131. Morrisey and "JEREMYM" of Sussex University. My thanks to them all.
  132.  
  133.  
  134. Version History:
  135. Version 1.0 was released on November 21st, 1989, at 11.14 am. No bugs have
  136. been reported to me (but maybe it hasn't been much used!)
  137.  
  138. Version 1.1 was released on March 14, 1990, at 3.22 pm. It contains the added
  139. ability to decode MACFILE LISTING files into spreadsheet-compatible form.
  140.  
  141. Version 1.1.1 was released on May 2, 1991, at 1.16 pm. I had downloaded a
  142. MACFILE LISTING with the auto-wrap set to 80 columns on my communications
  143. program once too often, and got infuriated with repeatedly having to click
  144. "Try again" for an overlong line because I couldn't get at "Cancel" in time.
  145. So I added the ability to "Abandon" as an alternative. Nothing else (I hope!)
  146. has changed.
  147.  
  148. Version 1.1.2 was released on June 4, 1992 at 11:04 am. Apart from tarting up the icon a little, no changes were made. It was, however, recompiled under the current version of Think Pascal (4.1).
  149.